﻿<%@ Page Language="C#" MasterPageFile="~/JOINT/MstPage_JOINT.master" AutoEventWireup="true"
    CodeFile="frmJ_TraineeRewPunInput.aspx.cs" Inherits="JOINT_frmJ_TraineeRewPunInput"
    Title="Untitled Page" Culture="ja-JP" UICulture="ja" ValidateRequest="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    入学情報（賞罰）登録
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <link href="../Style/JsStyle.css" rel="stylesheet" type="text/css" />
    <link href="../Style/Style.css" rel="stylesheet" type="text/css" />

    <script src="../js/jquery-1.4.1.js" type="text/javascript"></script>

    <script type="text/javascript" src="../Js/jquery.min.js"></script>

    <script type="text/javascript" src="../Js/jquery.alphanumeric.pack.js"></script>

    <script type="text/javascript" src="../Js/jquery.maskedinput.js"></script>
    
    <script src="../js/jquery.blockUI.js" type="text/javascript"></script>    

    <script src="../js/Validation.js" type="text/javascript"></script>

    <style type="text/css">
        .hidden
        {
            display: none;
        }
        .GVFixedHeader
        {
            display: none;
        }
        .gvHeader
        {
            background-color: Tan;
            font-weight: bold;
            height: 15px;
            padding-top: 5px;
        }
        .visible
        {
            display: none;
        }
        .font
        {
            font-family: MS UI Gothic;
        }
    </style>

    <script type="text/javascript" language="javascript">

        $(document).ready(function() {
           aReady();
        });
        function aReady() {
            //CALL METHOD registerControlToValidation
            registerControlToValidation("validation");
            //CALL METHOD formatDate
            formatDate("css_text_calender", "/");

            disableControlOnLoadUpdatePanel("<%= UpdatePanel1.ClientID %>", "<%= btn_登録.ClientID %>");
            disableControlOnLoadUpdatePanel("<%= UpdatePanel1.ClientID %>", "<%= btn_更新.ClientID %>");
            
            if (document.getElementById("ctl00_ContentPlaceHolder1_btn_登録") == null) {
                //CALL METHOD registerEnterEvent
                registerEnterEvent("next_control", "<%= btn_更新.ClientID %>", 3);

            } else {

                registerEnterEvent("next_control", "<%= btn_登録.ClientID %>", 3);

            }
        }
      
    </script>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btn_更新" />
        </Triggers>
        <ContentTemplate>
            <div class="maindiv1">
                <br />
                <div class="Header3">
                    <span>※現在までの賞罰情報を全て入力してください。
                        <br />
                        ※一つ賞罰が登録したら、登録ボタンを押して次の賞罰を登録してください。 </span>
                </div>
                <div>
                    &nbsp;</div>
                <div class="detail-admin-row">
                    <span class="detail-admin-label">賞罰名 :</span>
                    <asp:TextBox ID="Txt_賞罰名" runat="server" MaxLength="100" CssClass="next_control validation textbox width2"></asp:TextBox>
                    <span class="required-field">*</span>
                    <asp:RequiredFieldValidator runat="server" ID="validateTxt_賞罰名" ControlToValidate="Txt_賞罰名"
                        Display="None" ErrorMessage="" />
                    <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutExtender15"
                        TargetControlID="validateTxt_賞罰名" HighlightCssClass="invalid" CssClass="CustomValidatorCalloutStyle"
                        WarningIconImageUrl="../Images/warning.png" Width="240px" />
                </div>
                <div class="detail-admin-row">
                    <span class="detail-admin-label">賞罰年月日 :</span>
                    <asp:TextBox ID="txt_賞罰年月日" runat="server" CausesValidation="false" CssClass="next_control css_text_calender validation textbox width_calendar"
                        Style="ime-mode: disabled; float: left;" MaxLength="8"></asp:TextBox>
                    <asp:ImageButton ID="imb賞罰年月日" runat="server" ValidationGroup="123"
                        CssClass="btn_calendar" ImageUrl="~/Images/calendar.jpg" />
                    <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" PopupButtonID="imb賞罰年月日"
                        TargetControlID="txt_賞罰年月日" Format="yyyy/MM/dd" />
                    <span class="required-field">*</span>
                    <asp:RequiredFieldValidator runat="server" ID="validatetxt_賞罰年月日" ControlToValidate="txt_賞罰年月日"
                        Display="None" ErrorMessage="" />
                    <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutExtender7"
                        TargetControlID="validatetxt_賞罰年月日" HighlightCssClass="invalid" CssClass="CustomValidatorCalloutStyle"
                        WarningIconImageUrl="../Images/warning.png" Width="240px" />
                    <asp:CustomValidator ID="regular1" runat="server" ControlToValidate="txt_賞罰年月日" EnableClientScript="true"
                        ClientValidationFunction="isDate" Display="None"> </asp:CustomValidator>
                    <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutExtender2"
                        TargetControlID="regular1" HighlightCssClass="invalid" CssClass="CustomValidatorCalloutStyle"
                        WarningIconImageUrl="../Images/warning.png" Width="210px" />
                </div>
                <div class="detail-admin-row">
                    <span class="detail-admin-label">賞罰特記事項 :</span>
                    <asp:TextBox ID="txt賞罰特記事項" runat="server" ValidationGroup="123"  Rows="5"
                        TextMode="MultiLine" MaxLength="500" CssClass="next_control textarea japanese validation width4"></asp:TextBox>
                    <span class="required-field">*</span>
                    <asp:RequiredFieldValidator runat="server" ID="validatetxt賞罰特記事項" ControlToValidate="txt賞罰特記事項"
                        Display="None" ErrorMessage="" />
                    <ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="ValidatorCalloutExtender1"
                        TargetControlID="validatetxt賞罰特記事項" HighlightCssClass="invalid" CssClass="CustomValidatorCalloutStyle"
                        WarningIconImageUrl="../Images/warning.png" Width="240px" />
                </div>
                <div class="detail-admin-row">
                    <span class="detail-admin-label">&nbsp;</span>
                    <asp:Button ID="btn_登録" runat="server" Text="登録" CssClass="btn" OnClick="btn_登録_Click"
                        OnClientClick="javascript:focusToControlErr();" />
                    <asp:Button ID="btn_更新" runat="server" Text="更新" CssClass="btn" OnClick="btn_更新_Click"
                        OnClientClick="javascript:focusToControlErr();" />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Button ID="btn_リセット" runat="server" Text="リセット" CssClass="btn" ValidationGroup="123"
                        OnClick="btn_リセット_Click" />
                </div>
                <div style="height: 20px">
                </div>
                <div class="headerLineAndGray">
                    ＊賞罰情報一覧
                </div>
                <div style="height: 20px">
                </div>
                <div class="detail-admin-row" style="margin: 10px 50px 20px 50px">
                    <asp:GridView ID="grv1" runat="server" AutoGenerateColumns="False" CssClass="mGrid"
                        PagerStyle-CssClass="pgr" AlternatingRowStyle-CssClass="alt" GridLines="Vertical"
                        Height="40px" Width="100%">
                        <Columns>
                            <asp:HyperLinkField HeaderText="賞罰名" />
                            <asp:BoundField HeaderText="賞罰年月日" />
                            <asp:BoundField HeaderText="賞罰特記事項" />
                        </Columns>
                        <PagerSettings FirstPageText="最初" Mode="NumericFirstLast" PageButtonCount="5" LastPageText="最後" />
                    </asp:GridView>
                    <asp:GridView ID="grv" runat="server" AutoGenerateColumns="False" CssClass="mGrid"
                        PagerStyle-CssClass="pgr" AlternatingRowStyle-CssClass="alt" GridLines="Vertical"
                        Height="40px" Width="100%" OnRowDataBound="grv_RowDataBound" OnRowCommand="ItemView_RowCommand"
                        OnPageIndexChanging="grv_PageIndexChanging" PageSize="10" DataKeyNames="ID" AllowPaging="true">
                        <Columns>
                            <asp:TemplateField HeaderText="賞罰名">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" ToolTip='<%# Bind("賞罰名")%>'><%# Eval("賞罰名")%></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="賞罰年月日">
                                <ItemTemplate>
                                    <%#ConvertDate(Eval("賞罰年月日").ToString()) %></ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="賞罰特記事項">
                                <ItemTemplate>
                                    <div style="width: 200px; white-space: normal; overflow: hidden">
                                        <asp:Label ID="Label1" runat="server" ToolTip='<%# Bind("賞罰特記事項")%>' Height="100%"><%# Eval("賞罰特記事項") %></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField HeaderText="" DataField="IsInit" ItemStyle-CssClass="hidden" HeaderStyle-Width="0px"
                                HeaderStyle-CssClass="hidden" />
                            <asp:ButtonField Text="Button" DataTextField="ID" CommandName="LoadUpdate" Visible="true"
                                HeaderStyle-CssClass="visible" ItemStyle-CssClass="visible" FooterStyle-CssClass="visible">
                                <FooterStyle CssClass="visible" />
                                <HeaderStyle CssClass="visible" />
                                <ItemStyle CssClass="visible" />
                            </asp:ButtonField>
                        </Columns>
                        <PagerSettings FirstPageText="最初" Mode="NumericFirstLast" PageButtonCount="5" LastPageText="最後" />
                    </asp:GridView>
                </div>
                <div class="Header3">
                    <span>※修正があれば、修正する行をクリックして画面上に修正してください。
                        <br />
                        ※全て登録完了したら、登録完了ボタンを押してください。 </span>
                </div>
                <div>
                    &nbsp;</div>
                <div class="detail-admin-row ">
                    <span class="detail-admin-label detail-admin-label_fixedforfrmJ_TraineeRewPunInput">
                        &nbsp;</span>
                    <asp:Button ID="btn_キャンセル" runat="server" Text="キャンセル" CssClass="btn" OnClick="btn_キャンセル_Click"
                        ValidationGroup="123" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Button ID="btn_登録完了" runat="server" Text="登録完了" CssClass="btn" OnClick="btn_登録完了_Click"
                        ValidationGroup="123" />
                </div>
                <div>
                    &nbsp;</div>
                <br />
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
